home *** CD-ROM | disk | FTP | other *** search
- Path: ohstpy.mps.ohio-state.edu!vancleef
- From: vancleef@ohstpy.mps.ohio-state.edu
- Newsgroups: comp.lang.c++
- Subject: Re: Why use private class members instead of protected?
- Message-ID: <1996Jan11.022904.8720@ohstpy>
- Date: 11 Jan 96 02:29:04 -0500
- References: <30F4AB49.6ABB@sierra.net>
- Organization: The Ohio State University, Department of Physics
-
- In article <30F4AB49.6ABB@sierra.net>, TGColwell <snowbull@sierra.net> writes:
- > I'm relatively new to c++. I have one quick question: If child
- > classes can only access protected members of the parent class,
- > why make any members of any class private? Wouldn't it be
- > better to make members of the parent class protected so that the
- > class is alway "inheritance ready"?
-
-
-
-
- Because you may only want access to the 'private' members
- through a specific reference to that bnode?
-
- I actually ran into a case where I needed this.
-
- -Garrett
- >
- > Thanks in advance,
- >
- > -Tyler
-